export function http(url, method, data) {
	const baseURL = 'http://demonuxtapi.dishait.cn/mobile'
	wx.showLoading({
		title: '加载中'
	})
	return new Promise((resolve, reject) => {
		wx.request({
			url: baseURL + url,
			method: method,
			header: {
				"appid": "bd9d01ecc75dbbaaefce",
				"token": wx.getStorageSync("token")
			},
			data: {
				...data
			},
			success(res) {
				resolve(res)
			},
			fail(err) {
				reject(err)
			},
			complete() {
				wx.hideLoading()
			}
		})
	})
}
